{include file="common/header" /}
<input type="hidden" id="TenantId" name="TenantId" value="" />
<!--<div class="header"></div>-->
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form id="form" class="form form-horizontal" action="/admin/login" method="post">
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input name="mobile" type="text" placeholder="账户" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input  name="password" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <!--
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input class="input-text size-L" name="captcha" type="text" placeholder="验证码" style="width:150px;">
                    <img id="verify_img" src="{:captcha_src()}" alt="验证码" onclick="refreshVerify()">
                    <a href="javascript:refreshVerify()">点击刷新</a>
                </div>
            </div>
            -->
          <!-- <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <label for="online">
                        <input type="checkbox" name="online" id="online" value="">
                        使我保持登录状态</label>
                </div>
            </div>-->
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <a onclick="login()" class="btn btn-success radius size-L" >&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;<a>
                    <!--<input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">-->
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright <?=config('site_name')?></div>
<script>
    function refreshVerify() {
        var ts = Date.parse(new Date())/1000;
        var img = document.getElementById('verify_img');
        img.src = "/captcha?id="+ts;
    }
</script>
<script>
    function login () {
        $('#form').ajaxSubmit(function(res){
            if(res.ret==0) {
                layer.msg(res.message,{
                    time:2000
                },function(){
                    location.href = res.url;
                }); 
            }else{
                layer.msg(res.message);
            }
        });
    }
</script>
{include file="common/footer" /}